package com.hu.ta.assignment5.beans;

public class PosProbTable extends Table<Double, String, String> {

	public PosProbTable(String tokens[], String allTags[], WordPos wp) {
		super(tokens, allTags);

		values = new Double[columnNames.size() * rowNames.size()];

		int i = 0;

		for (String token : tokens) {
			int j = 0;
			for (String tag : allTags) {
				if (wp.containsKey(token)) {
					setValue(i, j, wp.get(token).getProbability(tag));
				}
				j++;
			}
			i++;
		}
	}
}
